#ifndef DEXTITLEBAR_H
#define DEXTITLEBAR_H

#include <QFrame>

class QPushButton;
class QHBoxLayout;

class DexTitleBar : public QFrame
	{
		Q_OBJECT

		public:
			DexTitleBar(QWidget *parent = 0, Qt::WindowFlags f = 0);

		protected:
			virtual void contextMenuEvent(QContextMenuEvent *);
			virtual void mouseMoveEvent(QMouseEvent *);
			virtual void mousePressEvent(QMouseEvent *);
			virtual void mouseReleaseEvent(QMouseEvent *);
			virtual void paintEvent(QPaintEvent *);
			virtual void resizeEvent(QResizeEvent*);

		private:
			QHBoxLayout *layout;
			QPushButton *minimizeBtn;
			QPushButton *restoreBtn;
			QPushButton *closeBtn;
			QPoint oldPos;

		signals:
			void closeWindow();
			void moveWindow(const QPoint &, const QPoint &);
	};

#endif // DEXTITLEBAR_H
